

<div id="templatemo_content_right">
  <div style="float:left;width:700px;height:445px;" >
  <div class="templatemo_product_box" style="float:left;width:600px;height:445px;">
            	
                


            	<h1>Add Purchasing Order For New Product </h1>
            	  
                    <div class="product_info">

					
					<a href="cp.php">Back To CP</a>
					<br/>
					<br/>
<form id='Add_New_Product_purchase' name='form_new' action='add_new_product_purchase.php' method='post' >
<!--
* choose category
* enter product name
* quantity
* purchase price
* sell price
* total purchase price
* product image
* product description
* date of purcahsing
* supplier name
-->

<table id='category' border='3' cellspacing='3' cellpadding='5'  border='2'
		bordercolor='yellow' align='center' width='600' >

<tr id='category_name'>
<td> * Category 
</td>
<td>
<select name='category_id' >
<?php
/*
this will read the name of all categorys from the db 
in the condition of the product is new 
*/
require_once('./DB.php');
$db=new DB;
$sql = "select Category_Id ,Name from categorys order by Name";
$que = $db->Query($sql);
while ($result = $db->Fetch_Array($que)){
echo "<option value='$result[Category_Id]'>$result[Name]</option>";
}
?>
</select>
<?php  $db->Disconnect();
unset($db);
?>
</td>
</tr>
<tr id='new_product_name'>
<td>* Product Name</td>
<td><input type='text' name='new_product_name' /></td>
</tr>
<tr id='quantity'>
<td>* Quantity</td>
<td><input type='text' name='quantity' onkeypress='validate(event)' /> (only Numbers)</td>
</tr>
<tr id='purchase_price'>
<td>* Purchase Price</td>
<td><input type='text' name='purchase_price' onkeypress='validate(event)' /> (only Numbers)</td>
</tr>
<tr id='sell_price'>
<td>* Sell Price</td>
<td><input type='text' name='sell_price' onkeypress='validate(event)' /> (only Numbers)</td>
</tr>
<tr id='total_purchase_price'>
<td>* Total Purchase Price</td>
<td><input type='text' name='total_purchase_price' onkeypress='validate(event)' /> (only Numbers)</td>
</tr>
<tr >
<td>* Product Image</td>
<td><input type='file' name='image_src'/></td>
</tr>
<tr id='description'>
<td>* Product descrition</td>
<td>
<textarea name='description'></textarea>
</td>
</tr>
<tr id='date_of_purchasing'>
<td>* Date of Order</td>
<td><input type='date' name='dop'></td>
</tr>
<tr id='supplier_name'>
<td>* Supplier Name</td>
<td><input type='text' name='supplier'></td>
</tr>
<tr id='note'>
<td colspan=3" cellpadding="3"><font size ="2" align="left" color="deeppink">* Indicates Required Fields</font></td>
</tr>
</table>

<center>

<input type='submit' name='submit' value='ADD'>
<input type='reset' name='reset' value='clear'>
</center>

</form>




</div>
                      </div>
    
            
            <div class="cleaner_with_height">&nbsp;</div>
           <!-- code for advertising image  -->           
		  
			
			
        </div> <!-- end of content right -->
